import React, {Component} from "react";
import {
	View,
	Text,
	Button,
} from "react-native";

export default class NavOne extends Component {
	static navigationOptions = {
		title: "Two页面",
	}
	constructor(props) {
		super(props)
	}
	render() {
		const {goBack, navigate} = this.props.navigation;
		return (
			<View>
				<Text>这是Two页面</Text>
				<View style={{marginBottom: 30}}>
					<Button 
						title="返回首页"
						onPress={() => goBack()}
					/>
				</View>
				<Button 
					title="跳到One页面"
					onPress={() => navigate('people')}
				/>
			</View>
		);
	}
}